import Dashboard from '@/components/layout/dashboard.vue';

// 公共、静态路由
export const commonRoutes = [
  {
    path: '/main',
    name: 'Main',
    component: Dashboard,
    redirect: { name: 'KgjIndex' },
    meta: { title: 'CRM系统' },
    children: [
      {
        path: '/kgj/index',
        name: 'KgjIndex',
        component: () => import('@/views/crm-kgj/home/index.vue'),
        meta: { title: '主页', authCode: 1000000, icon: 'House' }
      },
      {
        // path不要改，后台配置使用改路由
        path: '/manage/transferPage',
        name: 'FeishuLoginManageTransferPage',
        component: () => import('@/views/transfer-page/index.vue'),
        meta: { showAside: false }
      }
    ]
  },
  {
    path: '/redirect',
    name: 'Redirect',
    component: () => import('@/views/redirect/index.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue')
  }
  // {
  //   path: '/:pathMatch(.*)*',
  //   name: 'Fallback',
  //   component: () => import('@/views/redirect/index.vue')
  // }
];

// fallback: 暂时没用到，先隐藏
export const fallbackRoutes = [
  {
    path: '/:pathMatch(.*)*',
    name: 'Fallback',
    component: () => import('@/views/view-404/index.vue')
  }
];
